package com.example.star.service;

import com.example.star.entity.Address;
import com.example.star.entity.Follow;
import com.example.star.mapper.AddressMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressService {
    @Autowired
    private AddressMapper addressMapper;
    public void saveAddress(Address address) {
        addressMapper.insertAddress(address);
    }
    public List<Address> getAddress() {
        return addressMapper.getAddresses();
    }
    public List<Address> getAddressByUserName(String userName){
        return addressMapper.getAddressByUserName(userName);
    }

}
